function! api#vim#path#runtime() abort
    return split(&rtp, ',')
endfunction

function! api#vim#path#match(p) abort
    let lst = api#vim#path#runtime()
    let index = match(lst, a:p)
    if index >= 0
        return lst[index]
    endif
    return -1
endfunction
